import request from '@/router/axios';
import {downloadExcel} from '@/router/axios';
import {formatCondition} from '@/util/util';

//模型任务组任务项关系管理单条查询
export const queryBizModelTaskGroupTaskItem = (params) => {
  params.head.transCode = 'queryBizModelTaskGroupTaskItem';
  return request({
    url: '/biz/model/bizModelTaskGroupTaskItem/queryBizModelTaskGroupTaskItem',
    method: 'post',
    data: params
  })
}
//模型任务组任务项关系管理多条列表查询，支持条件查询
export const queryBizModelTaskGroupTaskItemListPage = (params) => {
  params.head.transCode = 'queryBizModelTaskGroupTaskItemListPage';
  return request({
    url: '/biz/model/bizModelTaskGroupTaskItem/queryBizModelTaskGroupTaskItemListPage',
    method: 'post',
    data: params
  })
}
//模型任务组任务项关系管理新增单条记录
export const saveBizModelTaskGroupTaskItem = (params) => {
  params.head.transCode = 'saveBizModelTaskGroupTaskItem';
  return request({
    url: '/biz/model/bizModelTaskGroupTaskItem/saveBizModelTaskGroupTaskItem',
    method: 'post',
    data: params
  })
}
//模型任务组任务项关系管理新增多条记录
export const saveBizModelTaskGroupTaskItemList = (params) => {
  params.head.transCode = 'saveBizModelTaskGroupTaskItemList';
  return request({
    url: '/biz/model/bizModelTaskGroupTaskItem/saveBizModelTaskGroupTaskItemList',
    method: 'post',
    data: params
  })
}
//模型任务组任务项关系管理新增或修改单条记录
export const saveOrUpdateBizModelTaskGroupTaskItem = (params) => {
  params.head.transCode = 'saveOrUpdateBizModelTaskGroupTaskItem';
  return request({
    url: '/biz/model/bizModelTaskGroupTaskItem/saveOrUpdateBizModelTaskGroupTaskItem',
    method: 'post',
    data: params
  })
}


//模型任务组任务项关系管理新增或修改单条记录
export const saveOrUpdateBizModelTaskGroupTaskItemList = (params) => {
  params.head.transCode = 'saveOrUpdateBizModelTaskGroupTaskItemList';
  return request({
    url: '/biz/model/bizModelTaskGroupTaskItem/saveOrUpdateBizModelTaskGroupTaskItemList',
    method: 'post',
    data: params
  })
}

//模型任务组任务项关系管理修改单条记录
export const updateBizModelTaskGroupTaskItem = (params) => {
  params.head.transCode = 'updateBizModelTaskGroupTaskItem';
  return request({
    url: '/biz/model/bizModelTaskGroupTaskItem/updateBizModelTaskGroupTaskItem',
    method: 'post',
    data: params
  })
}

//模型任务组任务项关系管理删除单条记录
export const deleteBizModelTaskGroupTaskItem = (params) => {
  params.head.transCode = 'deleteBizModelTaskGroupTaskItem';
  return request({
    url: '/biz/model/bizModelTaskGroupTaskItem/deleteBizModelTaskGroupTaskItem',
    method: 'post',
    data: params
  })
}

//模型任务组任务项关系管理删除多条记录
export const deleteBizModelTaskGroupTaskItemList = (params) => {
  params.head.transCode = 'deleteBizModelTaskGroupTaskItemList';
  return request({
    url: '/biz/model/bizModelTaskGroupTaskItem/deleteBizModelTaskGroupTaskItemList',
    method: 'post',
    data: params
  })
}
//模型任务组任务项关系管理导出excel
export const exportBizModelTaskGroupTaskItemExcel = (params) => {
  downloadExcel({
    url: '/biz/model/bizModelTaskGroupTaskItem/excelDownload/exportBizModelTaskGroupTaskItemExcel',
    method: 'get',
    data: 
    {
      tenantId: params.head.tenantId,
      orders:'',
      condition: formatCondition(params.body.sqlCondition)
    }
  })
}
